/**
  ******************************************************************************
  * @file    led.h
  * @author  Amaseing team
  * @version V1.0.0
  * @date    21-november-2013
  * @brief   Led driver
  *         
  ******************************************************************************  
  */ 
#ifndef _LED_H_
#define _LED_H_

/* Public includes -----------------------------------------------------------*/
#include <stm32f4xx.h>

/* Public defines ------------------------------------------------------------*/
#define LED_CAPTURE			(0)
#define LED_RUN				(1)
#define LED_ERROR			(3) 

#define LED_OBJ1			(4)
#define LED_OBJ2			(5)
#define LED_OBJ3			(6)
#define LED_FRONT			(7)

#define RESET_LED(a)		(GPIOD->ODR |=  (1<<a))
#define SET_LED(a)			(GPIOD->ODR &= ~(1<<a))
#define TOGGLE_LED(a)		(GPIOD->ODR ^=  (1<<a))

/* Public types --------------------------------------------------------------*/
/* Public functions ----------------------------------------------------------*/
// Init. The passed function is called when a packet is received.
void ledInit(void);

#endif //_LED_H_


